#ifndef VGA_H
#define VGA_H

#include <stdio.h>
#include <strings.h>
#include "control.h"
#include "main.h"
#include "render.h"
#include "timer.h"

extern unsigned char pal[768];
extern unsigned char pal2[768];

extern unsigned char* fnt;
extern unsigned char* fnt2;
extern unsigned char* tbox;

extern unsigned char* screen;
extern unsigned char* virscr;

// VERGE main palette
extern unsigned char vergepal[768];

// Menu transparencyfield (blue)
extern unsigned char menuxlatbl[256];

// Grey transparencyfield
extern unsigned char greyxlatbl[256];

// screen transparencyfield
extern unsigned char scrnxlatbl[256];

// full transparency table (64k)
extern unsigned char* transparencytbl;

extern unsigned char oc;

// vga.h
extern void initvga();
extern void closevga();
extern void quick_killgfx();
extern void quick_restoregfx();
extern void vgadump();
extern void setpixel(int x, int y, unsigned char c);
extern void vline(int x, int y, int y2, unsigned char c);
extern void hline(int x, int y, int dist, unsigned char c);
extern void box(int x, int y, int x2, int y2, unsigned char color);
extern void set_palette(unsigned char *pall);
extern void get_palette();
extern void set_intensity(unsigned int n);
extern void copytile(int x, int y, unsigned char *spr);
extern void copysprite(int x, int y, int width, int height, unsigned char *spr);
extern void grabregion(int x, int y, int width, int height, unsigned char *spr);
extern void tcopytile(int x, int y, unsigned char *spr, unsigned char *matte);
extern void tcopysprite(int x, int y, int width, int height, unsigned char *spr);
extern void fin();
extern void fout();
extern void wait();
extern void ColorScale(unsigned char *dest,int st,int fn,int inv);
extern void ColorField(int x, int y, int x2, int y2, unsigned char *tbl);
extern void Tcopysprite(int x1, int y1, int width, int height, unsigned char *src);
extern void _Tcopysprite(int x1, int y1, int width, int height, unsigned char *src);
extern void LoadFont();
extern void pchar(int x, int y, char c);
extern void VCpchar(int x, int y, char c);
extern void bigpchar(int x, int y, char c);
extern void gotoxy(int x, int y);
extern void printstring(char *str);
extern void VCprintstring(int xx, int yy, char *str);
extern void bigprintstring(char *str);
extern void putbox();
extern void dec_to_asciiz(int num, char *buf);
extern void textwindow(char portrait, char *str1, char *str2, char *str3);
extern void fontcolor(unsigned char c);


extern unsigned char *screen;
extern unsigned char *virscr;
extern unsigned char pal[768];

#endif
